﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Interfaces;
using Controller;

namespace GUI
{
    public partial class frmOpretVare : Form
    {
        //Ivare vare;

        public frmOpretVare()
        {
            InitializeComponent();
        }

        private void btnOpretVare_Click(object sender, EventArgs e)
        {
            VareController vc = new VareController();
            vc.OpretVare(txtVareNavn.Text, txtVareBeskrivelse.Text, Convert.ToInt32(txtVarePris.Text));
            string vareoprettet = "Din vare: " + txtVareNavn.Text + " er oprettet";
            MessageBox.Show(vareoprettet);
            this.Close();
        }
    }
}
